home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 008a / hgdll.zip / HGLASS.C < prev    next >
C/C++ Source or Header  |  1991-12-13  |  912b  |  56 lines

  1. *HGLASSDLL.c - Minimum DLL for GENERATING an HGLASS cursor in vb */
  2.  
  3. #include <WINDOWS.H>
  4.  
  5. int FAR PASCAL LibMain (HANDLE     hInstance,
  6.                         WORD    wDataSeg,
  7.                         WORD    cbHeapSize,
  8.                         LPSTR    lpszCmdLine)
  9.  
  10. {
  11.     HCURSOR hSaveCursor;
  12.     HCURSOR hHourGlass;
  13.  
  14.     hHourGlass = LoadCursor(NULL, IDC_WAIT);
  15.  
  16.     if (cbHeapSize != 0)     /* If DLL seg is MOVABLE */
  17.         UnlockData(0);
  18.  
  19.     return (1);                /* Init successfull.     */
  20. }
  21.  
  22. VOID FAR PASCAL Hglass (int Kind)
  23. {
  24.     if (Kind)
  25.     {
  26.         hSaveCursor = SetCursor(hHourGlass);
  27.     }
  28.     else
  29.     {
  30.         SetCursor(hHourGlass);
  31.     }
  32. }
  33.  
  34.  
  35. VOID FAR PASCAL WEP (int nParameter)
  36. {
  37.     if (nParameter == WEP_SYSTEM_EXIT)
  38.     {
  39.         /* System shutdown in progress... */
  40.         return (1);
  41.     }
  42.     else
  43.     {
  44.         if (nParameter == WEP_FREE_DLL)
  45.         {
  46.             /*DLL use is zero.  ALL apps have freed it */
  47.             return (1);
  48.         }
  49.         else
  50.         {
  51.             /*Undefined value.  Ignore. */
  52.             return (1);
  53.         }
  54.     }
  55. }
  56.